# uncompyle6 version 3.2.3
# Python bytecode 3.6 (3379)
# Decompiled from: Python 3.6.8 |Anaconda custom (64-bit)| (default, Feb 21 2019, 18:30:04) [MSC v.1916 64 bit (AMD64)]
# Embedded file name: site-packages\gevent\_compat.py
"""
internal gevent python 2/python 3 bridges. Not for external use.
"""
from __future__ import print_function, absolute_import, division
import sys

PY2 = sys.version_info[0] == 2
PY3 = sys.version_info[0] >= 3
PYPY = hasattr(sys, "pypy_version_info")
if PY3:
    string_types = (str,)
    integer_types = (int,)
    text_type = str
else:
    import __builtin__

    string_types = (__builtin__.basestring,)
    text_type = __builtin__.unicode
    integer_types = (int, __builtin__.long)
if PY3:

    def reraise(t, value, tb=None):
        if value.__traceback__ is not tb:
            if tb is not None:
                raise value.with_traceback(tb)
        raise value


else:
    from gevent._util_py2 import reraise

    reraise = reraise
if PY3:
    iteritems = dict.items
    itervalues = dict.values
    xrange = range
else:
    iteritems = dict.iteritems
    itervalues = dict.itervalues
    xrange = __builtin__.xrange
